﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SearchStock.aspx.cs" Inherits="DelStorage_SearchStock" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>正贸仓储物流管理系统</title>
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../JS/jquery-1.10.2.js"></script>
      <style type="text/css">
        .find td{
            border-bottom: 1px solid #b5d6e6;
            border-right:1px solid #b5d6e6;
            border-left: 1px solid #b5d6e6;
        }
     </style>
    <script type="text/javascript" language="javascript">

        function SelectAllCheckBox() {
            var form = document.forms[0];
            for (i = 0; i < form.elements.length; i++) {
                if (form.elements[i].checked == false) {
                    j = 0;
                }
                else {
                    j = 1;
                }
            } if (j == 0) {
                for (i = 0; i < form.elements.length; i++) {
                    form.elements[i].checked = true;
                }
            }
            else {
                for (i = 0; i < form.elements.length; i++) {
                    form.elements[i].checked = false;
                }
            }
        }

        $(function () {
            $('#gv input[type=checkbox]').click(function () {
                if ($(this).attr('checked') == undefined || $(this).attr('checked') == false) {
                    $(this).attr('checked', true).parent().parent().siblings('tr').find('input[type=checkbox]').attr('checked', false);
                }
                else {
                    $(this).attr('checked', false);
                }
            });
        });
    </script>

    <base target="_self" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table width="1160px" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="height: 30px">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="background-image: url(../images/tab_03.gif); background-repeat: repeat-x; width: 12px;">&nbsp;
                                </td>
                                <td style="background-image: url(../images/tab_05.gif); background-repeat: repeat-x; height: 30px;">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="width: 46%; vertical-align: middle;">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="width: 5%; vertical-align: middle;">
                                                            <img src="../images/tb.gif" width="16" height="16" />
                                                        </td>
                                                        <td style="width: 95%;">
                                                            <span>你当前的位置</span>：库存明细
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="54%"></td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="16" style="background-image: url(../images/tab_07.gif); height: 30px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="find">
                            <tr>
                                <td style="background-image: url(../images/tab_12.gif); width: 8px;">&nbsp;
                                </td>
                                <td>
                                    <table width="100%" cellspacing="0" cellpadding="0" style="border: 1px solid #b5d6e6;border-collapse:collapse;">
                                        <tr>
                                            <td align="center" style="font-size: 16px;">
                                                <label>单据剩余出库数量：</label>
                                                <asp:Label runat="server" ID="DelStorageCount"></asp:Label>
                                            </td>
                                            <td align="right" style="padding-right: 5px;">
                                                <asp:ImageButton ID="ibtnQuery" runat="server" ImageUrl="~/Images/Selected.gif" OnClick="ibtnQuery_Click" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <div style="margin-left: 0px; margin-top: 3px; width:99.6%; height: 400px; overflow-x: auto; overflow-y: auto;">
                                                    <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" Width="100%" OnRowDataBound="gv_RowDataBound">
                                                        <Columns>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>
                                                                    <%--<input id="hchkSelect" type="checkbox" onclick="SelectAllCheckBox()" />--%>
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelect" runat="server" />
                                                                </ItemTemplate>
                                                                <ItemStyle Width="5%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="编号">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labCodeType" runat="server" Text="<%#Container.DataItemIndex+1%>"></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="5%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="托盘号">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labTray_ID" runat="server" Text='<%# Bind("Tray_ID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="10%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="物料编码">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labMat_Code" runat="server" Text='<%# Bind("Mat_Code") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="10%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="物料名称">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labMat_Name" runat="server" Text='<%# Bind("Mat_Name") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="10%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="货位号">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labPos_ID" runat="server" Text='<%# Bind("Pos_ID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="10%" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="库存数量">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblMat_Num" runat="server" Text='<%# Bind("Mat_Num")%>' />
                                                                </ItemTemplate>
                                                                 <ItemStyle Width="6%" />
                                                            </asp:TemplateField>
                                                         <%--   <asp:TemplateField HeaderText="应发数量">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblNum" runat="server" Text="0" />
                                                                </ItemTemplate>
                                                                  <ItemStyle Width="50" />
                                                            </asp:TemplateField>--%>
                                                                  <asp:BoundField DataField="S01" HeaderText="规格">
                                                                <ItemStyle Width="8%" />
                                                            </asp:BoundField>
                                                               <asp:TemplateField HeaderText="材质">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="labTM01" runat="server" Text='<%# Bind("TM01") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="6%" />
                                                                    </asp:TemplateField>
                                                             <asp:TemplateField HeaderText="长度">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="labTM03" runat="server" Text='<%# Bind("TM03") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="6%" />
                                                                    </asp:TemplateField>
                                                                      <asp:TemplateField HeaderText="备注">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="labS02" runat="server" Text='<%# Bind("S02") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="12%" />
                                                                    </asp:TemplateField>
                                                    
                                                             <asp:TemplateField HeaderText="生产通知单">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labTS01" runat="server" Text='<%# Bind("TS01") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="8%" />
                                                            </asp:TemplateField>
                                                      <%--        <asp:TemplateField HeaderText="单位">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="labUnit_Base" runat="server" Text='<%# Bind("Unit_Base") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="5%" />
                                                            </asp:TemplateField>--%>
                                                            <asp:BoundField DataField="CDT" HeaderText="写入日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                                                                <ItemStyle Width="18%" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblPID" runat="server" Text='<%# Bind("PID")%>' />
                                                                </ItemTemplate>
                                                                <ItemStyle Width="5%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblNo_Lane" runat="server" Text='<%# Bind("No_Lane")%>' />
                                                                    <asp:Label ID="lblPos_State" runat="server" Text='<%# Bind("Pos_State") %>' />
                                                                </ItemTemplate>
                                                                <ItemStyle Width="5%" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <FooterStyle BackColor="#63B2FF" Font-Bold="True" ForeColor="White" />
                                                        <RowStyle BackColor="#EFF3FB" Font-Size="12px" HorizontalAlign="Center" />
                                                        <EditRowStyle BackColor="#2461BF" Font-Size="12px" />
                                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                        <PagerStyle BackColor="#63B2FF" ForeColor="White" HorizontalAlign="Center" />
                                                        <HeaderStyle BackColor="#63B2FF" Font-Bold="True" ForeColor="White" Font-Size="12px"
                                                            HorizontalAlign="Center" />
                                                        <AlternatingRowStyle BackColor="White" />
                                                        <PagerSettings Mode="Numeric"></PagerSettings>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="background-image: url(../images/tab_15.gif); width: 8px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td style="background-image: url(../images/tab_19.gif); height: 35px;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width: 12px; height: 35px;">
                                    <img src="../images/tab_18.gif" width="12" height="35" />
                                </td>
                                <td>&nbsp;
                                </td>
                                <td width="16">
                                    <img src="../images/tab_20.gif" width="16" height="35" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
